1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gobject.c.types;
26 
27 public import glib.c.types;
28 
29 
30 /**
31  * This is the signature of marshaller functions, required to marshall
32  * arrays of parameter values to signal emissions into C language callback
33  * invocations.
34  *
35  * It is merely an alias to #GClosureMarshal since the #GClosure mechanism
36  * takes over responsibility of actual function invocation for the signal
37  * system.
38  */
39 public alias GClosureMarshal GSignalCMarshaller;
40 
41 /**
42  * This is the signature of va_list marshaller functions, an optional
43  * marshaller that can be used in some situations to avoid
44  * marshalling the signal argument into GValues.
45  */
46 public alias GVaClosureMarshal GSignalCVaMarshaller;
47 
48 /**
49  * A value which represents the unique identifier of a registered type.
50  */
51 enum GType : size_t
52 {
53 	INVALID = 0<<2,
54 	NONE = 1<<2,
55 	INTERFACE = 2<<2,
56 	CHAR = 3<<2,
57 	UCHAR = 4<<2,
58 	BOOLEAN = 5<<2,
59 	INT = 6<<2,
60 	UINT = 7<<2,
61 	LONG = 8<<2,
62 	ULONG = 9<<2,
63 	INT64 = 10<<2,
64 	UINT64 = 11<<2,
65 	ENUM = 12<<2,
66 	FLAGS = 13<<2,
67 	FLOAT = 14<<2,
68 	DOUBLE = 15<<2,
69 	STRING = 16<<2,
70 	POINTER = 17<<2,
71 	BOXED = 18<<2,
72 	PARAM = 19<<2,
73 	OBJECT = 20<<2,
74 	VARIANT = 21<<2,
75 }
76 
77 /**
78  * Flags to be passed to g_object_bind_property() or
79  * g_object_bind_property_full().
80  *
81  * This enumeration can be extended at later date.
82  *
83  * Since: 2.26
84  */
85 public enum GBindingFlags
86 {
87 	/**
88 	 * The default binding; if the source property
89 	 * changes, the target property is updated with its value.
90 	 */
91 	DEFAULT = 0,
92 	/**
93 	 * Bidirectional binding; if either the
94 	 * property of the source or the property of the target changes,
95 	 * the other is updated.
96 	 */
97 	BIDIRECTIONAL = 1,
98 	/**
99 	 * Synchronize the values of the source and
100 	 * target properties when creating the binding; the direction of
101 	 * the synchronization is always from the source to the target.
102 	 */
103 	SYNC_CREATE = 2,
104 	/**
105 	 * If the two properties being bound are
106 	 * booleans, setting one to %TRUE will result in the other being
107 	 * set to %FALSE and vice versa. This flag will only work for
108 	 * boolean properties, and cannot be used when passing custom
109 	 * transformation functions to g_object_bind_property_full().
110 	 */
111 	INVERT_BOOLEAN = 4,
112 }
113 alias GBindingFlags BindingFlags;
114 
115 /**
116  * The connection flags are used to specify the behaviour of a signal's
117  * connection.
118  */
119 public enum GConnectFlags
120 {
121 	/**
122 	 * whether the handler should be called before or after the
123 	 * default handler of the signal.
124 	 */
125 	AFTER = 1,
126 	/**
127 	 * whether the instance and data should be swapped when
128 	 * calling the handler; see g_signal_connect_swapped() for an example.
129 	 */
130 	SWAPPED = 2,
131 }
132 alias GConnectFlags ConnectFlags;
133 
134 /**
135  * Through the #GParamFlags flag values, certain aspects of parameters
136  * can be configured.
137  *
138  * See also: %G_PARAM_STATIC_STRINGS
139  */
140 public enum GParamFlags : uint
141 {
142 	/**
143 	 * the parameter is readable
144 	 */
145 	READABLE = 1,
146 	/**
147 	 * the parameter is writable
148 	 */
149 	WRITABLE = 2,
150 	/**
151 	 * alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE
152 	 */
153 	READWRITE = 3,
154 	/**
155 	 * the parameter will be set upon object construction
156 	 */
157 	CONSTRUCT = 4,
158 	/**
159 	 * the parameter can only be set upon object construction
160 	 */
161 	CONSTRUCT_ONLY = 8,
162 	/**
163 	 * upon parameter conversion (see g_param_value_convert())
164 	 * strict validation is not required
165 	 */
166 	LAX_VALIDATION = 16,
167 	/**
168 	 * the string used as name when constructing the
169 	 * parameter is guaranteed to remain valid and
170 	 * unmodified for the lifetime of the parameter.
171 	 * Since 2.8
172 	 */
173 	STATIC_NAME = 32,
174 	/**
175 	 * internal
176 	 */
177 	PRIVATE = 32,
178 	/**
179 	 * the string used as nick when constructing the
180 	 * parameter is guaranteed to remain valid and
181 	 * unmmodified for the lifetime of the parameter.
182 	 * Since 2.8
183 	 */
184 	STATIC_NICK = 64,
185 	/**
186 	 * the string used as blurb when constructing the
187 	 * parameter is guaranteed to remain valid and
188 	 * unmodified for the lifetime of the parameter.
189 	 * Since 2.8
190 	 */
191 	STATIC_BLURB = 128,
192 	/**
193 	 * calls to g_object_set_property() for this
194 	 * property will not automatically result in a "notify" signal being
195 	 * emitted: the implementation must call g_object_notify() themselves
196 	 * in case the property actually changes.  Since: 2.42.
197 	 */
198 	EXPLICIT_NOTIFY = 1073741824,
199 	/**
200 	 * the parameter is deprecated and will be removed
201 	 * in a future version. A warning will be generated if it is used
202 	 * while running with G_ENABLE_DIAGNOSTIC=1.
203 	 * Since 2.26
204 	 */
205 	DEPRECATED = 2147483648,
206 }
207 alias GParamFlags ParamFlags;
208 
209 /**
210  * The signal flags are used to specify a signal's behaviour.
211  */
212 public enum GSignalFlags
213 {
214 	/**
215 	 * Invoke the object method handler in the first emission stage.
216 	 */
217 	RUN_FIRST = 1,
218 	/**
219 	 * Invoke the object method handler in the third emission stage.
220 	 */
221 	RUN_LAST = 2,
222 	/**
223 	 * Invoke the object method handler in the last emission stage.
224 	 */
225 	RUN_CLEANUP = 4,
226 	/**
227 	 * Signals being emitted for an object while currently being in
228 	 * emission for this very object will not be emitted recursively,
229 	 * but instead cause the first emission to be restarted.
230 	 */
231 	NO_RECURSE = 8,
232 	/**
233 	 * This signal supports "::detail" appendices to the signal name
234 	 * upon handler connections and emissions.
235 	 */
236 	DETAILED = 16,
237 	/**
238 	 * Action signals are signals that may freely be emitted on alive
239 	 * objects from user code via g_signal_emit() and friends, without
240 	 * the need of being embedded into extra code that performs pre or
241 	 * post emission adjustments on the object. They can also be thought
242 	 * of as object methods which can be called generically by
243 	 * third-party code.
244 	 */
245 	ACTION = 32,
246 	/**
247 	 * No emissions hooks are supported for this signal.
248 	 */
249 	NO_HOOKS = 64,
250 	/**
251 	 * Varargs signal emission will always collect the
252 	 * arguments, even if there are no signal handlers connected.  Since 2.30.
253 	 */
254 	MUST_COLLECT = 128,
255 	/**
256 	 * The signal is deprecated and will be removed
257 	 * in a future version. A warning will be generated if it is connected while
258 	 * running with G_ENABLE_DIAGNOSTIC=1.  Since 2.32.
259 	 */
260 	DEPRECATED = 256,
261 	/**
262 	 * Only used in #GSignalAccumulator accumulator
263 	 * functions for the #GSignalInvocationHint::run_type field to mark the first
264 	 * call to the accumulator function for a signal emission.  Since 2.68.
265 	 */
266 	ACCUMULATOR_FIRST_RUN = 131072,
267 }
268 alias GSignalFlags SignalFlags;
269 
270 /**
271  * The match types specify what g_signal_handlers_block_matched(),
272  * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched()
273  * match signals by.
274  */
275 public enum GSignalMatchType
276 {
277 	/**
278 	 * The signal id must be equal.
279 	 */
280 	ID = 1,
281 	/**
282 	 * The signal detail must be equal.
283 	 */
284 	DETAIL = 2,
285 	/**
286 	 * The closure must be the same.
287 	 */
288 	CLOSURE = 4,
289 	/**
290 	 * The C closure callback must be the same.
291 	 */
292 	FUNC = 8,
293 	/**
294 	 * The closure data must be the same.
295 	 */
296 	DATA = 16,
297 	/**
298 	 * Only unblocked signals may be matched.
299 	 */
300 	UNBLOCKED = 32,
301 }
302 alias GSignalMatchType SignalMatchType;
303 
304 /**
305  * These flags used to be passed to g_type_init_with_debug_flags() which
306  * is now deprecated.
307  *
308  * If you need to enable debugging features, use the GOBJECT_DEBUG
309  * environment variable.
310  *
311  * Deprecated: g_type_init() is now done automatically
312  */
313 public enum GTypeDebugFlags
314 {
315 	/**
316 	 * Print no messages
317 	 */
318 	NONE = 0,
319 	/**
320 	 * Print messages about object bookkeeping
321 	 */
322 	OBJECTS = 1,
323 	/**
324 	 * Print messages about signal emissions
325 	 */
326 	SIGNALS = 2,
327 	/**
328 	 * Keep a count of instances of each type
329 	 */
330 	INSTANCE_COUNT = 4,
331 	/**
332 	 * Mask covering all debug flags
333 	 */
334 	MASK = 7,
335 }
336 alias GTypeDebugFlags TypeDebugFlags;
337 
338 /**
339  * Bit masks used to check or determine characteristics of a type.
340  */
341 public enum GTypeFlags
342 {
343 	/**
344 	 * Indicates an abstract type. No instances can be
345 	 * created for an abstract type
346 	 */
347 	ABSTRACT = 16,
348 	/**
349 	 * Indicates an abstract value type, i.e. a type
350 	 * that introduces a value table, but can't be used for
351 	 * g_value_init()
352 	 */
353 	VALUE_ABSTRACT = 32,
354 	/**
355 	 * Indicates a final type. A final type is a non-derivable
356 	 * leaf node in a deep derivable type hierarchy tree. Since: 2.70
357 	 */
358 	FINAL = 64,
359 }
360 alias GTypeFlags TypeFlags;
361 
362 /**
363  * Bit masks used to check or determine specific characteristics of a
364  * fundamental type.
365  */
366 public enum GTypeFundamentalFlags
367 {
368 	/**
369 	 * Indicates a classed type
370 	 */
371 	CLASSED = 1,
372 	/**
373 	 * Indicates an instantiatable type (implies classed)
374 	 */
375 	INSTANTIATABLE = 2,
376 	/**
377 	 * Indicates a flat derivable type
378 	 */
379 	DERIVABLE = 4,
380 	/**
381 	 * Indicates a deep derivable type (implies derivable)
382 	 */
383 	DEEP_DERIVABLE = 8,
384 }
385 alias GTypeFundamentalFlags TypeFundamentalFlags;
386 
387 struct GBinding;
388 
389 struct GBindingGroup;
390 
391 /**
392  * A #GCClosure is a specialization of #GClosure for C function callbacks.
393  */
394 struct GCClosure
395 {
396 	/**
397 	 * the #GClosure
398 	 */
399 	GClosure closure;
400 	/**
401 	 * the callback function
402 	 */
403 	void* callback;
404 }
405 
406 struct GClosure
407 {
408 	import std.bitmanip: bitfields;
409 	mixin(bitfields!(
410 		uint, "refCount", 15,
411 		uint, "metaMarshalNouse", 1,
412 		uint, "nGuards", 1,
413 		uint, "nFnotifiers", 2,
414 		uint, "nInotifiers", 8,
415 		uint, "inInotify", 1,
416 		uint, "floating", 1,
417 		uint, "derivativeFlag", 1,
418 		uint, "inMarshal", 1,
419 		uint, "isInvalid", 1
420 	));
421 	/** */
422 	extern(C) void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) marshal;
423 	void* data;
424 	GClosureNotifyData* notifiers;
425 }
426 
427 struct GClosureNotifyData
428 {
429 	void* data;
430 	GClosureNotify notify;
431 }
432 
433 /**
434  * The class of an enumeration type holds information about its
435  * possible values.
436  */
437 struct GEnumClass
438 {
439 	/**
440 	 * the parent class
441 	 */
442 	GTypeClass gTypeClass;
443 	/**
444 	 * the smallest possible value.
445 	 */
446 	int minimum;
447 	/**
448 	 * the largest possible value.
449 	 */
450 	int maximum;
451 	/**
452 	 * the number of possible values.
453 	 */
454 	uint nValues;
455 	/**
456 	 * an array of #GEnumValue structs describing the
457 	 * individual values.
458 	 */
459 	GEnumValue* values;
460 }
461 
462 /**
463  * A structure which contains a single enum value, its name, and its
464  * nickname.
465  */
466 struct GEnumValue
467 {
468 	/**
469 	 * the enum value
470 	 */
471 	int value;
472 	/**
473 	 * the name of the value
474 	 */
475 	const(char)* valueName;
476 	/**
477 	 * the nickname of the value
478 	 */
479 	const(char)* valueNick;
480 }
481 
482 /**
483  * The class of a flags type holds information about its
484  * possible values.
485  */
486 struct GFlagsClass
487 {
488 	/**
489 	 * the parent class
490 	 */
491 	GTypeClass gTypeClass;
492 	/**
493 	 * a mask covering all possible values.
494 	 */
495 	uint mask;
496 	/**
497 	 * the number of possible values.
498 	 */
499 	uint nValues;
500 	/**
501 	 * an array of #GFlagsValue structs describing the
502 	 * individual values.
503 	 */
504 	GFlagsValue* values;
505 }
506 
507 /**
508  * A structure which contains a single flags value, its name, and its
509  * nickname.
510  */
511 struct GFlagsValue
512 {
513 	/**
514 	 * the flags value
515 	 */
516 	uint value;
517 	/**
518 	 * the name of the value
519 	 */
520 	const(char)* valueName;
521 	/**
522 	 * the nickname of the value
523 	 */
524 	const(char)* valueNick;
525 }
526 
527 /**
528  * A structure that provides information to the type system which is
529  * used specifically for managing interface types.
530  */
531 struct GInterfaceInfo
532 {
533 	/**
534 	 * location of the interface initialization function
535 	 */
536 	GInterfaceInitFunc interfaceInit;
537 	/**
538 	 * location of the interface finalization function
539 	 */
540 	GInterfaceFinalizeFunc interfaceFinalize;
541 	/**
542 	 * user-supplied data passed to the interface init/finalize functions
543 	 */
544 	void* interfaceData;
545 }
546 
547 struct GObject
548 {
549 	GTypeInstance gTypeInstance;
550 	uint refCount;
551 	GData* qdata;
552 }
553 
554 struct GObjectClass
555 {
556 	/**
557 	 * the parent class
558 	 */
559 	GTypeClass gTypeClass;
560 	GSList* constructProperties;
561 	/** */
562 	extern(C) GObject* function(GType type, uint nConstructProperties, GObjectConstructParam* constructProperties) constructor;
563 	/** */
564 	extern(C) void function(GObject* object, uint propertyId, GValue* value, GParamSpec* pspec) setProperty;
565 	/** */
566 	extern(C) void function(GObject* object, uint propertyId, GValue* value, GParamSpec* pspec) getProperty;
567 	/** */
568 	extern(C) void function(GObject* object) dispose;
569 	/** */
570 	extern(C) void function(GObject* object) finalize;
571 	/** */
572 	extern(C) void function(GObject* object, uint nPspecs, GParamSpec** pspecs) dispatchPropertiesChanged;
573 	/** */
574 	extern(C) void function(GObject* object, GParamSpec* pspec) notify;
575 	/** */
576 	extern(C) void function(GObject* object) constructed;
577 	size_t flags;
578 	void*[6] pdummy;
579 }
580 
581 /**
582  * The GObjectConstructParam struct is an auxiliary structure used to hand
583  * #GParamSpec/#GValue pairs to the @constructor of a #GObjectClass.
584  */
585 struct GObjectConstructParam
586 {
587 	/**
588 	 * the #GParamSpec of the construct parameter
589 	 */
590 	GParamSpec* pspec;
591 	/**
592 	 * the value to set the parameter to
593 	 */
594 	GValue* value;
595 }
596 
597 struct GParamSpec
598 {
599 	/**
600 	 * private #GTypeInstance portion
601 	 */
602 	GTypeInstance gTypeInstance;
603 	/**
604 	 * name of this parameter: always an interned string
605 	 */
606 	const(char)* name;
607 	/**
608 	 * #GParamFlags flags for this parameter
609 	 */
610 	GParamFlags flags;
611 	/**
612 	 * the #GValue type for this parameter
613 	 */
614 	GType valueType;
615 	/**
616 	 * #GType type that uses (introduces) this parameter
617 	 */
618 	GType ownerType;
619 	char* Nick;
620 	char* Blurb;
621 	GData* qdata;
622 	uint refCount;
623 	uint paramId;
624 }
625 
626 struct GParamSpecBoolean
627 {
628 	/**
629 	 * private #GParamSpec portion
630 	 */
631 	GParamSpec parentInstance;
632 	/**
633 	 * default value for the property specified
634 	 */
635 	bool defaultValue;
636 }
637 
638 struct GParamSpecBoxed
639 {
640 	/**
641 	 * private #GParamSpec portion
642 	 */
643 	GParamSpec parentInstance;
644 }
645 
646 struct GParamSpecChar
647 {
648 	/**
649 	 * private #GParamSpec portion
650 	 */
651 	GParamSpec parentInstance;
652 	/**
653 	 * minimum value for the property specified
654 	 */
655 	byte minimum;
656 	/**
657 	 * maximum value for the property specified
658 	 */
659 	byte maximum;
660 	/**
661 	 * default value for the property specified
662 	 */
663 	byte defaultValue;
664 }
665 
666 /**
667  * The class structure for the GParamSpec type.
668  * Normally, GParamSpec classes are filled by
669  * g_param_type_register_static().
670  */
671 struct GParamSpecClass
672 {
673 	/**
674 	 * the parent class
675 	 */
676 	GTypeClass gTypeClass;
677 	/**
678 	 * the #GValue type for this parameter
679 	 */
680 	GType valueType;
681 	/** */
682 	extern(C) void function(GParamSpec* pspec) finalize;
683 	/** */
684 	extern(C) void function(GParamSpec* pspec, GValue* value) valueSetDefault;
685 	/** */
686 	extern(C) int function(GParamSpec* pspec, GValue* value) valueValidate;
687 	/** */
688 	extern(C) int function(GParamSpec* pspec, GValue* value1, GValue* value2) valuesCmp;
689 	void*[4] dummy;
690 }
691 
692 struct GParamSpecDouble
693 {
694 	/**
695 	 * private #GParamSpec portion
696 	 */
697 	GParamSpec parentInstance;
698 	/**
699 	 * minimum value for the property specified
700 	 */
701 	double minimum;
702 	/**
703 	 * maximum value for the property specified
704 	 */
705 	double maximum;
706 	/**
707 	 * default value for the property specified
708 	 */
709 	double defaultValue;
710 	/**
711 	 * values closer than @epsilon will be considered identical
712 	 * by g_param_values_cmp(); the default value is 1e-90.
713 	 */
714 	double epsilon;
715 }
716 
717 struct GParamSpecEnum
718 {
719 	/**
720 	 * private #GParamSpec portion
721 	 */
722 	GParamSpec parentInstance;
723 	/**
724 	 * the #GEnumClass for the enum
725 	 */
726 	GEnumClass* enumClass;
727 	/**
728 	 * default value for the property specified
729 	 */
730 	int defaultValue;
731 }
732 
733 struct GParamSpecFlags
734 {
735 	/**
736 	 * private #GParamSpec portion
737 	 */
738 	GParamSpec parentInstance;
739 	/**
740 	 * the #GFlagsClass for the flags
741 	 */
742 	GFlagsClass* flagsClass;
743 	/**
744 	 * default value for the property specified
745 	 */
746 	uint defaultValue;
747 }
748 
749 struct GParamSpecFloat
750 {
751 	/**
752 	 * private #GParamSpec portion
753 	 */
754 	GParamSpec parentInstance;
755 	/**
756 	 * minimum value for the property specified
757 	 */
758 	float minimum;
759 	/**
760 	 * maximum value for the property specified
761 	 */
762 	float maximum;
763 	/**
764 	 * default value for the property specified
765 	 */
766 	float defaultValue;
767 	/**
768 	 * values closer than @epsilon will be considered identical
769 	 * by g_param_values_cmp(); the default value is 1e-30.
770 	 */
771 	float epsilon;
772 }
773 
774 struct GParamSpecGType
775 {
776 	/**
777 	 * private #GParamSpec portion
778 	 */
779 	GParamSpec parentInstance;
780 	/**
781 	 * a #GType whose subtypes can occur as values
782 	 */
783 	GType isAType;
784 }
785 
786 struct GParamSpecInt
787 {
788 	/**
789 	 * private #GParamSpec portion
790 	 */
791 	GParamSpec parentInstance;
792 	/**
793 	 * minimum value for the property specified
794 	 */
795 	int minimum;
796 	/**
797 	 * maximum value for the property specified
798 	 */
799 	int maximum;
800 	/**
801 	 * default value for the property specified
802 	 */
803 	int defaultValue;
804 }
805 
806 struct GParamSpecInt64
807 {
808 	/**
809 	 * private #GParamSpec portion
810 	 */
811 	GParamSpec parentInstance;
812 	/**
813 	 * minimum value for the property specified
814 	 */
815 	long minimum;
816 	/**
817 	 * maximum value for the property specified
818 	 */
819 	long maximum;
820 	/**
821 	 * default value for the property specified
822 	 */
823 	long defaultValue;
824 }
825 
826 struct GParamSpecLong
827 {
828 	/**
829 	 * private #GParamSpec portion
830 	 */
831 	GParamSpec parentInstance;
832 	/**
833 	 * minimum value for the property specified
834 	 */
835 	glong minimum;
836 	/**
837 	 * maximum value for the property specified
838 	 */
839 	glong maximum;
840 	/**
841 	 * default value for the property specified
842 	 */
843 	glong defaultValue;
844 }
845 
846 struct GParamSpecObject
847 {
848 	/**
849 	 * private #GParamSpec portion
850 	 */
851 	GParamSpec parentInstance;
852 }
853 
854 struct GParamSpecOverride
855 {
856 	GParamSpec parentInstance;
857 	GParamSpec* overridden;
858 }
859 
860 struct GParamSpecParam
861 {
862 	/**
863 	 * private #GParamSpec portion
864 	 */
865 	GParamSpec parentInstance;
866 }
867 
868 struct GParamSpecPointer
869 {
870 	/**
871 	 * private #GParamSpec portion
872 	 */
873 	GParamSpec parentInstance;
874 }
875 
876 struct GParamSpecPool;
877 
878 struct GParamSpecString
879 {
880 	/**
881 	 * private #GParamSpec portion
882 	 */
883 	GParamSpec parentInstance;
884 	/**
885 	 * default value for the property specified
886 	 */
887 	char* defaultValue;
888 	/**
889 	 * a string containing the allowed values for the first byte
890 	 */
891 	char* csetFirst;
892 	/**
893 	 * a string containing the allowed values for the subsequent bytes
894 	 */
895 	char* csetNth;
896 	/**
897 	 * the replacement byte for bytes which don't match @cset_first or @cset_nth.
898 	 */
899 	char substitutor;
900 	import std.bitmanip: bitfields;
901 	mixin(bitfields!(
902 		uint, "nullFoldIfEmpty", 1,
903 		uint, "ensureNonNull", 1,
904 		uint, "", 30
905 	));
906 }
907 
908 /**
909  * This structure is used to provide the type system with the information
910  * required to initialize and destruct (finalize) a parameter's class and
911  * instances thereof.
912  *
913  * The initialized structure is passed to the g_param_type_register_static()
914  * The type system will perform a deep copy of this structure, so its memory
915  * does not need to be persistent across invocation of
916  * g_param_type_register_static().
917  */
918 struct GParamSpecTypeInfo
919 {
920 	/**
921 	 * Size of the instance (object) structure.
922 	 */
923 	ushort instanceSize;
924 	/**
925 	 * Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the [slice allocator][glib-Memory-Slices] now.
926 	 */
927 	ushort nPreallocs;
928 	/** */
929 	extern(C) void function(GParamSpec* pspec) instanceInit;
930 	/**
931 	 * The #GType of values conforming to this #GParamSpec
932 	 */
933 	GType valueType;
934 	/** */
935 	extern(C) void function(GParamSpec* pspec) finalize;
936 	/** */
937 	extern(C) void function(GParamSpec* pspec, GValue* value) valueSetDefault;
938 	/** */
939 	extern(C) int function(GParamSpec* pspec, GValue* value) valueValidate;
940 	/** */
941 	extern(C) int function(GParamSpec* pspec, GValue* value1, GValue* value2) valuesCmp;
942 }
943 
944 struct GParamSpecUChar
945 {
946 	/**
947 	 * private #GParamSpec portion
948 	 */
949 	GParamSpec parentInstance;
950 	/**
951 	 * minimum value for the property specified
952 	 */
953 	ubyte minimum;
954 	/**
955 	 * maximum value for the property specified
956 	 */
957 	ubyte maximum;
958 	/**
959 	 * default value for the property specified
960 	 */
961 	ubyte defaultValue;
962 }
963 
964 struct GParamSpecUInt
965 {
966 	/**
967 	 * private #GParamSpec portion
968 	 */
969 	GParamSpec parentInstance;
970 	/**
971 	 * minimum value for the property specified
972 	 */
973 	uint minimum;
974 	/**
975 	 * maximum value for the property specified
976 	 */
977 	uint maximum;
978 	/**
979 	 * default value for the property specified
980 	 */
981 	uint defaultValue;
982 }
983 
984 struct GParamSpecUInt64
985 {
986 	/**
987 	 * private #GParamSpec portion
988 	 */
989 	GParamSpec parentInstance;
990 	/**
991 	 * minimum value for the property specified
992 	 */
993 	ulong minimum;
994 	/**
995 	 * maximum value for the property specified
996 	 */
997 	ulong maximum;
998 	/**
999 	 * default value for the property specified
1000 	 */
1001 	ulong defaultValue;
1002 }
1003 
1004 struct GParamSpecULong
1005 {
1006 	/**
1007 	 * private #GParamSpec portion
1008 	 */
1009 	GParamSpec parentInstance;
1010 	/**
1011 	 * minimum value for the property specified
1012 	 */
1013 	gulong minimum;
1014 	/**
1015 	 * maximum value for the property specified
1016 	 */
1017 	gulong maximum;
1018 	/**
1019 	 * default value for the property specified
1020 	 */
1021 	gulong defaultValue;
1022 }
1023 
1024 struct GParamSpecUnichar
1025 {
1026 	/**
1027 	 * private #GParamSpec portion
1028 	 */
1029 	GParamSpec parentInstance;
1030 	/**
1031 	 * default value for the property specified
1032 	 */
1033 	dchar defaultValue;
1034 }
1035 
1036 struct GParamSpecValueArray
1037 {
1038 	/**
1039 	 * private #GParamSpec portion
1040 	 */
1041 	GParamSpec parentInstance;
1042 	/**
1043 	 * a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
1044 	 */
1045 	GParamSpec* elementSpec;
1046 	/**
1047 	 * if greater than 0, arrays of this property will always have this many elements
1048 	 */
1049 	uint fixedNElements;
1050 }
1051 
1052 struct GParamSpecVariant
1053 {
1054 	/**
1055 	 * private #GParamSpec portion
1056 	 */
1057 	GParamSpec parentInstance;
1058 	/**
1059 	 * a #GVariantType, or %NULL
1060 	 */
1061 	GVariantType* type;
1062 	/**
1063 	 * a #GVariant, or %NULL
1064 	 */
1065 	GVariant* defaultValue;
1066 	void*[4] padding;
1067 }
1068 
1069 /**
1070  * The GParameter struct is an auxiliary structure used
1071  * to hand parameter name/value pairs to g_object_newv().
1072  *
1073  * Deprecated: This type is not introspectable.
1074  */
1075 struct GParameter
1076 {
1077 	/**
1078 	 * the parameter name
1079 	 */
1080 	const(char)* name;
1081 	/**
1082 	 * the parameter value
1083 	 */
1084 	GValue value;
1085 }
1086 
1087 struct GSignalGroup;
1088 
1089 /**
1090  * The #GSignalInvocationHint structure is used to pass on additional information
1091  * to callbacks during a signal emission.
1092  */
1093 struct GSignalInvocationHint
1094 {
1095 	/**
1096 	 * The signal id of the signal invoking the callback
1097 	 */
1098 	uint signalId;
1099 	/**
1100 	 * The detail passed on for this emission
1101 	 */
1102 	GQuark detail;
1103 	/**
1104 	 * The stage the signal emission is currently in, this
1105 	 * field will contain one of %G_SIGNAL_RUN_FIRST,
1106 	 * %G_SIGNAL_RUN_LAST or %G_SIGNAL_RUN_CLEANUP and %G_SIGNAL_ACCUMULATOR_FIRST_RUN.
1107 	 * %G_SIGNAL_ACCUMULATOR_FIRST_RUN is only set for the first run of the accumulator
1108 	 * function for a signal emission.
1109 	 */
1110 	GSignalFlags runType;
1111 }
1112 
1113 /**
1114  * A structure holding in-depth information for a specific signal.
1115  *
1116  * See also: g_signal_query()
1117  */
1118 struct GSignalQuery
1119 {
1120 	/**
1121 	 * The signal id of the signal being queried, or 0 if the
1122 	 * signal to be queried was unknown.
1123 	 */
1124 	uint signalId;
1125 	/**
1126 	 * The signal name.
1127 	 */
1128 	const(char)* signalName;
1129 	/**
1130 	 * The interface/instance type that this signal can be emitted for.
1131 	 */
1132 	GType itype;
1133 	/**
1134 	 * The signal flags as passed in to g_signal_new().
1135 	 */
1136 	GSignalFlags signalFlags;
1137 	/**
1138 	 * The return type for user callbacks.
1139 	 */
1140 	GType returnType;
1141 	/**
1142 	 * The number of parameters that user callbacks take.
1143 	 */
1144 	uint nParams;
1145 	/**
1146 	 * The individual parameter types for
1147 	 * user callbacks, note that the effective callback signature is:
1148 	 * |[<!-- language="C" -->
1149 	 * @return_type callback (#gpointer     data1,
1150 	 * [param_types param_names,]
1151 	 * gpointer     data2);
1152 	 * ]|
1153 	 */
1154 	GType* paramTypes;
1155 }
1156 
1157 struct GTypeCValue
1158 {
1159 	union
1160 	{
1161 	}
1162 }
1163 
1164 struct GTypeClass
1165 {
1166 	GType gType;
1167 }
1168 
1169 /**
1170  * A structure that provides information to the type system which is
1171  * used specifically for managing fundamental types.
1172  */
1173 struct GTypeFundamentalInfo
1174 {
1175 	/**
1176 	 * #GTypeFundamentalFlags describing the characteristics of the fundamental type
1177 	 */
1178 	GTypeFundamentalFlags typeFlags;
1179 }
1180 
1181 /**
1182  * This structure is used to provide the type system with the information
1183  * required to initialize and destruct (finalize) a type's class and
1184  * its instances.
1185  *
1186  * The initialized structure is passed to the g_type_register_static() function
1187  * (or is copied into the provided #GTypeInfo structure in the
1188  * g_type_plugin_complete_type_info()). The type system will perform a deep
1189  * copy of this structure, so its memory does not need to be persistent
1190  * across invocation of g_type_register_static().
1191  */
1192 struct GTypeInfo
1193 {
1194 	/**
1195 	 * Size of the class structure (required for interface, classed and instantiatable types)
1196 	 */
1197 	ushort classSize;
1198 	/**
1199 	 * Location of the base initialization function (optional)
1200 	 */
1201 	GBaseInitFunc baseInit;
1202 	/**
1203 	 * Location of the base finalization function (optional)
1204 	 */
1205 	GBaseFinalizeFunc baseFinalize;
1206 	/**
1207 	 * Location of the class initialization function for
1208 	 * classed and instantiatable types. Location of the default vtable
1209 	 * inititalization function for interface types. (optional) This function
1210 	 * is used both to fill in virtual functions in the class or default vtable,
1211 	 * and to do type-specific setup such as registering signals and object
1212 	 * properties.
1213 	 */
1214 	GClassInitFunc classInit;
1215 	/**
1216 	 * Location of the class finalization function for
1217 	 * classed and instantiatable types. Location of the default vtable
1218 	 * finalization function for interface types. (optional)
1219 	 */
1220 	GClassFinalizeFunc classFinalize;
1221 	/**
1222 	 * User-supplied data passed to the class init/finalize functions
1223 	 */
1224 	void* classData;
1225 	/**
1226 	 * Size of the instance (object) structure (required for instantiatable types only)
1227 	 */
1228 	ushort instanceSize;
1229 	/**
1230 	 * Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the [slice allocator][glib-Memory-Slices] now.
1231 	 */
1232 	ushort nPreallocs;
1233 	/**
1234 	 * Location of the instance initialization function (optional, for instantiatable types only)
1235 	 */
1236 	GInstanceInitFunc instanceInit;
1237 	/**
1238 	 * A #GTypeValueTable function table for generic handling of GValues
1239 	 * of this type (usually only useful for fundamental types)
1240 	 */
1241 	GTypeValueTable* valueTable;
1242 }
1243 
1244 struct GTypeInstance
1245 {
1246 	GTypeClass* gClass;
1247 }
1248 
1249 struct GTypeInterface
1250 {
1251 	GType gType;
1252 	GType gInstanceType;
1253 }
1254 
1255 struct GTypeModule
1256 {
1257 	GObject parentInstance;
1258 	uint useCount;
1259 	GSList* typeInfos;
1260 	GSList* interfaceInfos;
1261 	/**
1262 	 * the name of the module
1263 	 */
1264 	char* name;
1265 }
1266 
1267 /**
1268  * In order to implement dynamic loading of types based on #GTypeModule,
1269  * the @load and @unload functions in #GTypeModuleClass must be implemented.
1270  */
1271 struct GTypeModuleClass
1272 {
1273 	/**
1274 	 * the parent class
1275 	 */
1276 	GObjectClass parentClass;
1277 	/** */
1278 	extern(C) int function(GTypeModule* module_) load;
1279 	/** */
1280 	extern(C) void function(GTypeModule* module_) unload;
1281 	/** */
1282 	extern(C) void function() reserved1;
1283 	/** */
1284 	extern(C) void function() reserved2;
1285 	/** */
1286 	extern(C) void function() reserved3;
1287 	/** */
1288 	extern(C) void function() reserved4;
1289 }
1290 
1291 struct GTypePlugin;
1292 
1293 /**
1294  * The #GTypePlugin interface is used by the type system in order to handle
1295  * the lifecycle of dynamically loaded types.
1296  */
1297 struct GTypePluginClass
1298 {
1299 	GTypeInterface baseIface;
1300 	/**
1301 	 * Increases the use count of the plugin.
1302 	 */
1303 	GTypePluginUse usePlugin;
1304 	/**
1305 	 * Decreases the use count of the plugin.
1306 	 */
1307 	GTypePluginUnuse unusePlugin;
1308 	/**
1309 	 * Fills in the #GTypeInfo and
1310 	 * #GTypeValueTable structs for the type. The structs are initialized
1311 	 * with `memset(s, 0, sizeof (s))` before calling this function.
1312 	 */
1313 	GTypePluginCompleteTypeInfo completeTypeInfo;
1314 	/**
1315 	 * Fills in missing parts of the #GInterfaceInfo
1316 	 * for the interface. The structs is initialized with
1317 	 * `memset(s, 0, sizeof (s))` before calling this function.
1318 	 */
1319 	GTypePluginCompleteInterfaceInfo completeInterfaceInfo;
1320 }
1321 
1322 /**
1323  * A structure holding information for a specific type.
1324  *
1325  * See also: g_type_query()
1326  */
1327 struct GTypeQuery
1328 {
1329 	/**
1330 	 * the #GType value of the type
1331 	 */
1332 	GType type;
1333 	/**
1334 	 * the name of the type
1335 	 */
1336 	const(char)* typeName;
1337 	/**
1338 	 * the size of the class structure
1339 	 */
1340 	uint classSize;
1341 	/**
1342 	 * the size of the instance structure
1343 	 */
1344 	uint instanceSize;
1345 }
1346 
1347 /**
1348  * The #GTypeValueTable provides the functions required by the #GValue
1349  * implementation, to serve as a container for values of a type.
1350  */
1351 struct GTypeValueTable
1352 {
1353 	/** */
1354 	extern(C) void function(GValue* value) valueInit;
1355 	/** */
1356 	extern(C) void function(GValue* value) valueFree;
1357 	/** */
1358 	extern(C) void function(GValue* srcValue, GValue* destValue) valueCopy;
1359 	/** */
1360 	extern(C) void* function(GValue* value) valuePeekPointer;
1361 	/**
1362 	 * A string format describing how to collect the contents of
1363 	 * this value bit-by-bit. Each character in the format represents
1364 	 * an argument to be collected, and the characters themselves indicate
1365 	 * the type of the argument. Currently supported arguments are:
1366 	 * - 'i' - Integers. passed as collect_values[].v_int.
1367 	 * - 'l' - Longs. passed as collect_values[].v_long.
1368 	 * - 'd' - Doubles. passed as collect_values[].v_double.
1369 	 * - 'p' - Pointers. passed as collect_values[].v_pointer.
1370 	 * It should be noted that for variable argument list construction,
1371 	 * ANSI C promotes every type smaller than an integer to an int, and
1372 	 * floats to doubles. So for collection of short int or char, 'i'
1373 	 * needs to be used, and for collection of floats 'd'.
1374 	 */
1375 	const(char)* collectFormat;
1376 	/** */
1377 	extern(C) char* function(GValue* value, uint nCollectValues, GTypeCValue* collectValues, uint collectFlags) collectValue;
1378 	/**
1379 	 * Format description of the arguments to collect for @lcopy_value,
1380 	 * analogous to @collect_format. Usually, @lcopy_format string consists
1381 	 * only of 'p's to provide lcopy_value() with pointers to storage locations.
1382 	 */
1383 	const(char)* lcopyFormat;
1384 	/** */
1385 	extern(C) char* function(GValue* value, uint nCollectValues, GTypeCValue* collectValues, uint collectFlags) lcopyValue;
1386 }
1387 
1388 struct GValue
1389 {
1390 	GType gType;
1391 	_Value__data__union[2] data;
1392 }
1393 
1394 struct GValueArray
1395 {
1396 	/**
1397 	 * number of values contained in the array
1398 	 */
1399 	uint nValues;
1400 	/**
1401 	 * array of values
1402 	 */
1403 	GValue* values;
1404 	uint nPrealloced;
1405 }
1406 
1407 struct GWeakRef
1408 {
1409 	union Priv
1410 	{
1411 		void* p;
1412 	}
1413 	Priv priv;
1414 }
1415 
1416 struct _Value__data__union
1417 {
1418 	union
1419 	{
1420 		int vInt;
1421 		uint vUint;
1422 		glong vLong;
1423 		gulong vUlong;
1424 		long vInt64;
1425 		ulong vUint64;
1426 		float vFloat;
1427 		double vDouble;
1428 		void* vPointer;
1429 	}
1430 }
1431 
1432 /**
1433  * A callback function used by the type system to finalize those portions
1434  * of a derived types class structure that were setup from the corresponding
1435  * GBaseInitFunc() function.
1436  *
1437  * Class finalization basically works the inverse way in which class
1438  * initialization is performed.
1439  *
1440  * See GClassInitFunc() for a discussion of the class initialization process.
1441  *
1442  * Params:
1443  *     gClass = The #GTypeClass structure to finalize
1444  */
1445 public alias extern(C) void function(void* gClass) GBaseFinalizeFunc;
1446 
1447 /**
1448  * A callback function used by the type system to do base initialization
1449  * of the class structures of derived types.
1450  *
1451  * This function is called as part of the initialization process of all derived
1452  * classes and should reallocate or reset all dynamic class members copied over
1453  * from the parent class.
1454  *
1455  * For example, class members (such as strings) that are not sufficiently
1456  * handled by a plain memory copy of the parent class into the derived class
1457  * have to be altered. See GClassInitFunc() for a discussion of the class
1458  * initialization process.
1459  *
1460  * Params:
1461  *     gClass = The #GTypeClass structure to initialize
1462  */
1463 public alias extern(C) void function(void* gClass) GBaseInitFunc;
1464 
1465 /**
1466  * A function to be called to transform @from_value to @to_value.
1467  *
1468  * If this is the @transform_to function of a binding, then @from_value
1469  * is the @source_property on the @source object, and @to_value is the
1470  * @target_property on the @target object. If this is the
1471  * @transform_from function of a %G_BINDING_BIDIRECTIONAL binding,
1472  * then those roles are reversed.
1473  *
1474  * Params:
1475  *     binding = a #GBinding
1476  *     fromValue = the #GValue containing the value to transform
1477  *     toValue = the #GValue in which to store the transformed value
1478  *     userData = data passed to the transform function
1479  *
1480  * Returns: %TRUE if the transformation was successful, and %FALSE
1481  *     otherwise
1482  *
1483  * Since: 2.26
1484  */
1485 public alias extern(C) int function(GBinding* binding, GValue* fromValue, GValue* toValue, void* userData) GBindingTransformFunc;
1486 
1487 /**
1488  * This function is provided by the user and should produce a copy
1489  * of the passed in boxed structure.
1490  *
1491  * Params:
1492  *     boxed = The boxed structure to be copied.
1493  *
1494  * Returns: The newly created copy of the boxed structure.
1495  */
1496 public alias extern(C) void* function(void* boxed) GBoxedCopyFunc;
1497 
1498 /**
1499  * This function is provided by the user and should free the boxed
1500  * structure passed.
1501  *
1502  * Params:
1503  *     boxed = The boxed structure to be freed.
1504  */
1505 public alias extern(C) void function(void* boxed) GBoxedFreeFunc;
1506 
1507 /**
1508  * The type used for callback functions in structure definitions and function
1509  * signatures.
1510  *
1511  * This doesn't mean that all callback functions must take no  parameters and
1512  * return void. The required signature of a callback function is determined by
1513  * the context in which is used (e.g. the signal to which it is connected).
1514  *
1515  * Use G_CALLBACK() to cast the callback function to a #GCallback.
1516  */
1517 public alias extern(C) void function() GCallback;
1518 
1519 /**
1520  * A callback function used by the type system to finalize a class.
1521  *
1522  * This function is rarely needed, as dynamically allocated class resources
1523  * should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
1524  *
1525  * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo
1526  * structure of a static type is invalid, because classes of static types
1527  * will never be finalized (they are artificially kept alive when their
1528  * reference count drops to zero).
1529  *
1530  * Params:
1531  *     gClass = The #GTypeClass structure to finalize
1532  *     classData = The @class_data member supplied via the #GTypeInfo structure
1533  */
1534 public alias extern(C) void function(void* gClass, void* classData) GClassFinalizeFunc;
1535 
1536 /**
1537  * A callback function used by the type system to initialize the class
1538  * of a specific type.
1539  *
1540  * This function should initialize all static class members.
1541  *
1542  * The initialization process of a class involves:
1543  *
1544  * - Copying common members from the parent class over to the
1545  * derived class structure.
1546  * - Zero initialization of the remaining members not copied
1547  * over from the parent class.
1548  * - Invocation of the GBaseInitFunc() initializers of all parent
1549  * types and the class' type.
1550  * - Invocation of the class' GClassInitFunc() initializer.
1551  *
1552  * Since derived classes are partially initialized through a memory copy
1553  * of the parent class, the general rule is that GBaseInitFunc() and
1554  * GBaseFinalizeFunc() should take care of necessary reinitialization
1555  * and release of those class members that were introduced by the type
1556  * that specified these GBaseInitFunc()/GBaseFinalizeFunc().
1557  * GClassInitFunc() should only care about initializing static
1558  * class members, while dynamic class members (such as allocated strings
1559  * or reference counted resources) are better handled by a GBaseInitFunc()
1560  * for this type, so proper initialization of the dynamic class members
1561  * is performed for class initialization of derived types as well.
1562  *
1563  * An example may help to correspond the intend of the different class
1564  * initializers:
1565  *
1566  * |[<!-- language="C" -->
1567  * typedef struct {
1568  * GObjectClass parent_class;
1569  * gint         static_integer;
1570  * gchar       *dynamic_string;
1571  * } TypeAClass;
1572  * static void
1573  * type_a_base_class_init (TypeAClass *class)
1574  * {
1575  * class->dynamic_string = g_strdup ("some string");
1576  * }
1577  * static void
1578  * type_a_base_class_finalize (TypeAClass *class)
1579  * {
1580  * g_free (class->dynamic_string);
1581  * }
1582  * static void
1583  * type_a_class_init (TypeAClass *class)
1584  * {
1585  * class->static_integer = 42;
1586  * }
1587  *
1588  * typedef struct {
1589  * TypeAClass   parent_class;
1590  * gfloat       static_float;
1591  * GString     *dynamic_gstring;
1592  * } TypeBClass;
1593  * static void
1594  * type_b_base_class_init (TypeBClass *class)
1595  * {
1596  * class->dynamic_gstring = g_string_new ("some other string");
1597  * }
1598  * static void
1599  * type_b_base_class_finalize (TypeBClass *class)
1600  * {
1601  * g_string_free (class->dynamic_gstring);
1602  * }
1603  * static void
1604  * type_b_class_init (TypeBClass *class)
1605  * {
1606  * class->static_float = 3.14159265358979323846;
1607  * }
1608  * ]|
1609  *
1610  * Initialization of TypeBClass will first cause initialization of
1611  * TypeAClass (derived classes reference their parent classes, see
1612  * g_type_class_ref() on this).
1613  *
1614  * Initialization of TypeAClass roughly involves zero-initializing its fields,
1615  * then calling its GBaseInitFunc() type_a_base_class_init() to allocate
1616  * its dynamic members (dynamic_string), and finally calling its GClassInitFunc()
1617  * type_a_class_init() to initialize its static members (static_integer).
1618  * The first step in the initialization process of TypeBClass is then
1619  * a plain memory copy of the contents of TypeAClass into TypeBClass and
1620  * zero-initialization of the remaining fields in TypeBClass.
1621  * The dynamic members of TypeAClass within TypeBClass now need
1622  * reinitialization which is performed by calling type_a_base_class_init()
1623  * with an argument of TypeBClass.
1624  *
1625  * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
1626  * is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
1627  * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
1628  * is called to complete the initialization process with the static members
1629  * (static_float).
1630  *
1631  * Corresponding finalization counter parts to the GBaseInitFunc() functions
1632  * have to be provided to release allocated resources at class finalization
1633  * time.
1634  *
1635  * Params:
1636  *     gClass = The #GTypeClass structure to initialize.
1637  *     classData = The @class_data member supplied via the #GTypeInfo structure.
1638  */
1639 public alias extern(C) void function(void* gClass, void* classData) GClassInitFunc;
1640 
1641 /**
1642  * The type used for marshaller functions.
1643  *
1644  * Params:
1645  *     closure = the #GClosure to which the marshaller belongs
1646  *     returnValue = a #GValue to store the return
1647  *         value. May be %NULL if the callback of @closure doesn't return a
1648  *         value.
1649  *     nParamValues = the length of the @param_values array
1650  *     paramValues = an array of
1651  *         #GValues holding the arguments on which to invoke the
1652  *         callback of @closure
1653  *     invocationHint = the invocation hint given as the
1654  *         last argument to g_closure_invoke()
1655  *     marshalData = additional data specified when
1656  *         registering the marshaller, see g_closure_set_marshal() and
1657  *         g_closure_set_meta_marshal()
1658  */
1659 public alias extern(C) void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) GClosureMarshal;
1660 
1661 /**
1662  * The type used for the various notification callbacks which can be registered
1663  * on closures.
1664  *
1665  * Params:
1666  *     data = data specified when registering the notification callback
1667  *     closure = the #GClosure on which the notification is emitted
1668  */
1669 public alias extern(C) void function(void* data, GClosure* closure) GClosureNotify;
1670 
1671 /**
1672  * A callback function used by the type system to initialize a new
1673  * instance of a type.
1674  *
1675  * This function initializes all instance members and allocates any resources
1676  * required by it.
1677  *
1678  * Initialization of a derived instance involves calling all its parent
1679  * types instance initializers, so the class member of the instance
1680  * is altered during its initialization to always point to the class that
1681  * belongs to the type the current initializer was introduced for.
1682  *
1683  * The extended members of @instance are guaranteed to have been filled with
1684  * zeros before this function is called.
1685  *
1686  * Params:
1687  *     instance_ = The instance to initialize
1688  *     gClass = The class of the type the instance is
1689  *         created for
1690  */
1691 public alias extern(C) void function(GTypeInstance* instance_, void* gClass) GInstanceInitFunc;
1692 
1693 /**
1694  * A callback function used by the type system to finalize an interface.
1695  *
1696  * This function should destroy any internal data and release any resources
1697  * allocated by the corresponding GInterfaceInitFunc() function.
1698  *
1699  * Params:
1700  *     gIface = The interface structure to finalize
1701  *     ifaceData = The @interface_data supplied via the #GInterfaceInfo structure
1702  */
1703 public alias extern(C) void function(void* gIface, void* ifaceData) GInterfaceFinalizeFunc;
1704 
1705 /**
1706  * A callback function used by the type system to initialize a new
1707  * interface.
1708  *
1709  * This function should initialize all internal data and* allocate any
1710  * resources required by the interface.
1711  *
1712  * The members of @iface_data are guaranteed to have been filled with
1713  * zeros before this function is called.
1714  *
1715  * Params:
1716  *     gIface = The interface structure to initialize
1717  *     ifaceData = The @interface_data supplied via the #GInterfaceInfo structure
1718  */
1719 public alias extern(C) void function(void* gIface, void* ifaceData) GInterfaceInitFunc;
1720 
1721 /**
1722  * The type of the @finalize function of #GObjectClass.
1723  *
1724  * Params:
1725  *     object = the #GObject being finalized
1726  */
1727 public alias extern(C) void function(GObject* object) GObjectFinalizeFunc;
1728 
1729 /**
1730  * The type of the @get_property function of #GObjectClass.
1731  *
1732  * Params:
1733  *     object = a #GObject
1734  *     propertyId = the numeric id under which the property was registered with
1735  *         g_object_class_install_property().
1736  *     value = a #GValue to return the property value in
1737  *     pspec = the #GParamSpec describing the property
1738  */
1739 public alias extern(C) void function(GObject* object, uint propertyId, GValue* value, GParamSpec* pspec) GObjectGetPropertyFunc;
1740 
1741 /**
1742  * The type of the @set_property function of #GObjectClass.
1743  *
1744  * Params:
1745  *     object = a #GObject
1746  *     propertyId = the numeric id under which the property was registered with
1747  *         g_object_class_install_property().
1748  *     value = the new value for the property
1749  *     pspec = the #GParamSpec describing the property
1750  */
1751 public alias extern(C) void function(GObject* object, uint propertyId, GValue* value, GParamSpec* pspec) GObjectSetPropertyFunc;
1752 
1753 /**
1754  * The signal accumulator is a special callback function that can be used
1755  * to collect return values of the various callbacks that are called
1756  * during a signal emission.
1757  *
1758  * The signal accumulator is specified at signal creation time, if it is
1759  * left %NULL, no accumulation of callback return values is performed.
1760  * The return value of signal emissions is then the value returned by the
1761  * last callback.
1762  *
1763  * Params:
1764  *     ihint = Signal invocation hint, see #GSignalInvocationHint.
1765  *     returnAccu = Accumulator to collect callback return values in, this
1766  *         is the return value of the current signal emission.
1767  *     handlerReturn = A #GValue holding the return value of the signal handler.
1768  *     data = Callback data that was specified when creating the signal.
1769  *
1770  * Returns: The accumulator function returns whether the signal emission
1771  *     should be aborted. Returning %TRUE will continue with
1772  *     the signal emission. Returning %FALSE will abort the current emission.
1773  *     Since 2.62, returning %FALSE will skip to the CLEANUP stage. In this case,
1774  *     emission will occur as normal in the CLEANUP stage and the handler's
1775  *     return value will be accumulated.
1776  */
1777 public alias extern(C) int function(GSignalInvocationHint* ihint, GValue* returnAccu, GValue* handlerReturn, void* data) GSignalAccumulator;
1778 
1779 /**
1780  * A simple function pointer to get invoked when the signal is emitted.
1781  *
1782  * Emission hooks allow you to tie a hook to the signal type, so that it will
1783  * trap all emissions of that signal, from any object.
1784  *
1785  * You may not attach these to signals created with the %G_SIGNAL_NO_HOOKS flag.
1786  *
1787  * Params:
1788  *     ihint = Signal invocation hint, see #GSignalInvocationHint.
1789  *     nParamValues = the number of parameters to the function, including
1790  *         the instance on which the signal was emitted.
1791  *     paramValues = the instance on which
1792  *         the signal was emitted, followed by the parameters of the emission.
1793  *     data = user data associated with the hook.
1794  *
1795  * Returns: whether it wants to stay connected. If it returns %FALSE, the signal
1796  *     hook is disconnected (and destroyed).
1797  */
1798 public alias extern(C) int function(GSignalInvocationHint* ihint, uint nParamValues, GValue* paramValues, void* data) GSignalEmissionHook;
1799 
1800 /**
1801  * A callback function used for notification when the state
1802  * of a toggle reference changes.
1803  *
1804  * See also: g_object_add_toggle_ref()
1805  *
1806  * Params:
1807  *     data = Callback data passed to g_object_add_toggle_ref()
1808  *     object = The object on which g_object_add_toggle_ref() was called.
1809  *     isLastRef = %TRUE if the toggle reference is now the
1810  *         last reference to the object. %FALSE if the toggle
1811  *         reference was the last reference and there are now other
1812  *         references.
1813  */
1814 public alias extern(C) void function(void* data, GObject* object, int isLastRef) GToggleNotify;
1815 
1816 /**
1817  * A callback function which is called when the reference count of a class
1818  * drops to zero.
1819  *
1820  * It may use g_type_class_ref() to prevent the class from being freed. You
1821  * should not call g_type_class_unref() from a #GTypeClassCacheFunc function
1822  * to prevent infinite recursion, use g_type_class_unref_uncached() instead.
1823  *
1824  * The functions have to check the class id passed in to figure
1825  * whether they actually want to cache the class of this type, since all
1826  * classes are routed through the same #GTypeClassCacheFunc chain.
1827  *
1828  * Params:
1829  *     cacheData = data that was given to the g_type_add_class_cache_func() call
1830  *     gClass = The #GTypeClass structure which is
1831  *         unreferenced
1832  *
1833  * Returns: %TRUE to stop further #GTypeClassCacheFuncs from being
1834  *     called, %FALSE to continue
1835  */
1836 public alias extern(C) int function(void* cacheData, GTypeClass* gClass) GTypeClassCacheFunc;
1837 
1838 /**
1839  * A callback called after an interface vtable is initialized.
1840  *
1841  * See g_type_add_interface_check().
1842  *
1843  * Params:
1844  *     checkData = data passed to g_type_add_interface_check()
1845  *     gIface = the interface that has been
1846  *         initialized
1847  *
1848  * Since: 2.4
1849  */
1850 public alias extern(C) void function(void* checkData, void* gIface) GTypeInterfaceCheckFunc;
1851 
1852 /**
1853  * The type of the @complete_interface_info function of #GTypePluginClass.
1854  *
1855  * Params:
1856  *     plugin = the #GTypePlugin
1857  *     instanceType = the #GType of an instantiatable type to which the interface
1858  *         is added
1859  *     interfaceType = the #GType of the interface whose info is completed
1860  *     info = the #GInterfaceInfo to fill in
1861  */
1862 public alias extern(C) void function(GTypePlugin* plugin, GType instanceType, GType interfaceType, GInterfaceInfo* info) GTypePluginCompleteInterfaceInfo;
1863 
1864 /**
1865  * The type of the @complete_type_info function of #GTypePluginClass.
1866  *
1867  * Params:
1868  *     plugin = the #GTypePlugin
1869  *     gType = the #GType whose info is completed
1870  *     info = the #GTypeInfo struct to fill in
1871  *     valueTable = the #GTypeValueTable to fill in
1872  */
1873 public alias extern(C) void function(GTypePlugin* plugin, GType gType, GTypeInfo* info, GTypeValueTable* valueTable) GTypePluginCompleteTypeInfo;
1874 
1875 /**
1876  * The type of the @unuse_plugin function of #GTypePluginClass.
1877  *
1878  * Params:
1879  *     plugin = the #GTypePlugin whose use count should be decreased
1880  */
1881 public alias extern(C) void function(GTypePlugin* plugin) GTypePluginUnuse;
1882 
1883 /**
1884  * The type of the @use_plugin function of #GTypePluginClass, which gets called
1885  * to increase the use count of @plugin.
1886  *
1887  * Params:
1888  *     plugin = the #GTypePlugin whose use count should be increased
1889  */
1890 public alias extern(C) void function(GTypePlugin* plugin) GTypePluginUse;
1891 
1892 /**
1893  * This is the signature of va_list marshaller functions, an optional
1894  * marshaller that can be used in some situations to avoid
1895  * marshalling the signal argument into GValues.
1896  *
1897  * Params:
1898  *     closure = the #GClosure to which the marshaller belongs
1899  *     returnValue = a #GValue to store the return
1900  *         value. May be %NULL if the callback of @closure doesn't return a
1901  *         value.
1902  *     instance_ = the instance on which the closure is
1903  *         invoked.
1904  *     args = va_list of arguments to be passed to the closure.
1905  *     marshalData = additional data specified when
1906  *         registering the marshaller, see g_closure_set_marshal() and
1907  *         g_closure_set_meta_marshal()
1908  *     nParams = the length of the @param_types array
1909  *     paramTypes = the #GType of each argument from
1910  *         @args.
1911  */
1912 public alias extern(C) void function(GClosure* closure, GValue* returnValue, void* instance_, void* args, void* marshalData, int nParams, GType* paramTypes) GVaClosureMarshal;
1913 
1914 /**
1915  * The type of value transformation functions which can be registered with
1916  * g_value_register_transform_func().
1917  *
1918  * @dest_value will be initialized to the correct destination type.
1919  *
1920  * Params:
1921  *     srcValue = Source value.
1922  *     destValue = Target value.
1923  */
1924 public alias extern(C) void function(GValue* srcValue, GValue* destValue) GValueTransform;
1925 
1926 /**
1927  * A #GWeakNotify function can be added to an object as a callback that gets
1928  * triggered when the object is finalized.
1929  *
1930  * Since the object is already being disposed when the #GWeakNotify is called,
1931  * there's not much you could do with the object, apart from e.g. using its
1932  * address as hash-index or the like.
1933  *
1934  * In particular, this means it’s invalid to call g_object_ref(),
1935  * g_weak_ref_init(), g_weak_ref_set(), g_object_add_toggle_ref(),
1936  * g_object_weak_ref(), g_object_add_weak_pointer() or any function which calls
1937  * them on the object from this callback.
1938  *
1939  * Params:
1940  *     data = data that was provided when the weak reference was established
1941  *     whereTheObjectWas = the object being disposed
1942  */
1943 public alias extern(C) void function(void* data, GObject* whereTheObjectWas) GWeakNotify;
1944 
1945 /**
1946  * Mask containing the bits of #GParamSpec.flags which are reserved for GLib.
1947  */
1948 enum PARAM_MASK = 255;
1949 alias G_PARAM_MASK = PARAM_MASK;
1950 
1951 /**
1952  * #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB.
1953  *
1954  * Since 2.13.0
1955  */
1956 enum PARAM_STATIC_STRINGS = 224;
1957 alias G_PARAM_STATIC_STRINGS = PARAM_STATIC_STRINGS;
1958 
1959 /**
1960  * Minimum shift count to be used for user defined flags, to be stored in
1961  * #GParamSpec.flags. The maximum allowed is 10.
1962  */
1963 enum PARAM_USER_SHIFT = 8;
1964 alias G_PARAM_USER_SHIFT = PARAM_USER_SHIFT;
1965 
1966 /**
1967  * A mask for all #GSignalFlags bits.
1968  */
1969 enum SIGNAL_FLAGS_MASK = 511;
1970 alias G_SIGNAL_FLAGS_MASK = SIGNAL_FLAGS_MASK;
1971 
1972 /**
1973  * A mask for all #GSignalMatchType bits.
1974  */
1975 enum SIGNAL_MATCH_MASK = 63;
1976 alias G_SIGNAL_MATCH_MASK = SIGNAL_MATCH_MASK;
1977 
1978 /**
1979  * A bit in the type number that's supposed to be left untouched.
1980  */
1981 enum TYPE_FLAG_RESERVED_ID_BIT = 1;
1982 alias G_TYPE_FLAG_RESERVED_ID_BIT = TYPE_FLAG_RESERVED_ID_BIT;
1983 
1984 /**
1985  * An integer constant that represents the number of identifiers reserved
1986  * for types that are assigned at compile-time.
1987  */
1988 enum TYPE_FUNDAMENTAL_MAX = 255;
1989 alias G_TYPE_FUNDAMENTAL_MAX = TYPE_FUNDAMENTAL_MAX;
1990 
1991 /**
1992  * Shift value used in converting numbers to type IDs.
1993  */
1994 enum TYPE_FUNDAMENTAL_SHIFT = 2;
1995 alias G_TYPE_FUNDAMENTAL_SHIFT = TYPE_FUNDAMENTAL_SHIFT;
1996 
1997 /**
1998  * First fundamental type number to create a new fundamental type id with
1999  * G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.
2000  */
2001 enum TYPE_RESERVED_BSE_FIRST = 32;
2002 alias G_TYPE_RESERVED_BSE_FIRST = TYPE_RESERVED_BSE_FIRST;
2003 
2004 /**
2005  * Last fundamental type number reserved for BSE.
2006  */
2007 enum TYPE_RESERVED_BSE_LAST = 48;
2008 alias G_TYPE_RESERVED_BSE_LAST = TYPE_RESERVED_BSE_LAST;
2009 
2010 /**
2011  * First fundamental type number to create a new fundamental type id with
2012  * G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.
2013  */
2014 enum TYPE_RESERVED_GLIB_FIRST = 22;
2015 alias G_TYPE_RESERVED_GLIB_FIRST = TYPE_RESERVED_GLIB_FIRST;
2016 
2017 /**
2018  * Last fundamental type number reserved for GLib.
2019  */
2020 enum TYPE_RESERVED_GLIB_LAST = 31;
2021 alias G_TYPE_RESERVED_GLIB_LAST = TYPE_RESERVED_GLIB_LAST;
2022 
2023 /**
2024  * First available fundamental type number to create new fundamental
2025  * type id with G_TYPE_MAKE_FUNDAMENTAL().
2026  */
2027 enum TYPE_RESERVED_USER_FIRST = 49;
2028 alias G_TYPE_RESERVED_USER_FIRST = TYPE_RESERVED_USER_FIRST;
2029 
2030 /**
2031  * For string values, indicates that the string contained is canonical and will
2032  * exist for the duration of the process. See g_value_set_interned_string().
2033  */
2034 enum VALUE_INTERNED_STRING = 268435456;
2035 alias G_VALUE_INTERNED_STRING = VALUE_INTERNED_STRING;
2036 
2037 /**
2038  * If passed to G_VALUE_COLLECT(), allocated data won't be copied
2039  * but used verbatim. This does not affect ref-counted types like
2040  * objects. This does not affect usage of g_value_copy(), the data will
2041  * be copied if it is not ref-counted.
2042  */
2043 enum VALUE_NOCOPY_CONTENTS = 134217728;
2044 alias G_VALUE_NOCOPY_CONTENTS = VALUE_NOCOPY_CONTENTS;